package com.itheima.demo04;

import com.itheima.demo03.Student;

public class ManagerTest {
    public static void main(String[] args) {
        //空参构造
        //1. 创建Manager类的对象.
        Manager imanager = new Manager();
        //2. 给属性赋值
        imanager.setName("王五");
        imanager.setBouns(100);
        imanager.setSalary(50000);
        imanager.setId(999);
        //3. 打印属性值
        System.out.println("姓名:" + imanager.getName() + "工号:" + imanager.getId() + "工资:" + imanager.getSalary() + "奖金:" + imanager.getBouns());
        //4. 调用成员方法
        imanager.work();
        System.out.println("-------------------------");

        //全参构造
        //1. 创建对象
        Manager imanager2 = new Manager(666, 2000, 1100, "赵六");
        //2. 打印属性.
        System.out.println("姓名:" + imanager2.getName() + "工号:" + imanager2.getId() + "工资:" + imanager2.getSalary() + "奖金:" + imanager2.getBouns());
        //3. 调用方法
        imanager2.work();
    }

}
